home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / kill-the-dragons.swf / scripts / frame_639 / DoAction.as
Encoding:
Text File  |  2011-12-21  |  2.2 KB  |  116 lines

  1. snowBallHits = 0;
  2. throwPowerBar = 10;
  3. kills = 0;
  4. thisLevel = 3;
  5. levelEnd = false;
  6. powerUp1Hit = 20;
  7. powerUp2Hit = 10;
  8. powerUp3Hit = 20;
  9. powerUp4Hit = 40;
  10. powerUp5Hit = 5;
  11. powerUpDisplay = false;
  12. powerUpUse = false;
  13. powerUpShots = 0;
  14. powerUpTimeMax = 10000;
  15. shieldThrow = false;
  16. specialThrow = false;
  17. specialThrowWait = false;
  18. hitPause = false;
  19. shieldEnergy = 100;
  20. powerUpTimeOld = getTimer();
  21. plySpeed = 5;
  22. plySnowBalls = 0;
  23. plyMaxSnowBalls = 30;
  24. plyThrowTimeMax = 300;
  25. plyThrowTimeOld = getTimer();
  26. plyWalk = false;
  27. plyWithin = false;
  28. mouseX = ply._x;
  29. mouseY = ply._y;
  30. oppTotal = 5;
  31. oppSpeed = 7;
  32. oppMove = 0;
  33. oppMaxMove = 3;
  34. oppMoveAmount = 70;
  35. oppPauseLength = 500;
  36. oppSnowBalls = 0;
  37. oppMaxSnowBalls = 20;
  38. oppSnowBallPower = 7;
  39. oppThrowTimeMax = 200;
  40. oppThrowRate = 30;
  41. oppThrowTimeOld = getTimer();
  42. plyInitialise = function()
  43. {
  44.    plyThrow.onRollOver = function()
  45.    {
  46.       plyWithin = true;
  47.    };
  48.    plyThrow.onRollOut = function()
  49.    {
  50.       plyWithin = false;
  51.    };
  52.    plyThrow.onDragOut = function()
  53.    {
  54.       plyWithin = false;
  55.    };
  56. };
  57. plyInitialise();
  58. plyExchange = function()
  59. {
  60.    ply.plyAnim.removeMovieClip();
  61.    ply.attachMovie("CHARBack","plyAnim",ply.getNextHighestDepth());
  62.    ply.plyAnim.charSelect = _root.charSelect;
  63.    hitPause = false;
  64. };
  65. plyExchange();
  66. if(_root.charSelect == undefined)
  67. {
  68.    _root.charSelect = "c";
  69.    _root.charTeam = "agency";
  70. }
  71. ply.plyAnim.charSelect = _root.charSelect;
  72. ply.plyNo = 1;
  73. scorePanel.char.gotoAndStop(_root.charSelect);
  74. i = 1;
  75. while(i <= oppTotal)
  76. {
  77.    this["oppd" + i].oppNo = i;
  78.    i++;
  79. }
  80. charArray = new Array(5);
  81. charArray[1] = "wm";
  82. charArray[2] = "wm";
  83. charArray[3] = "wm";
  84. charArray[4] = "wm";
  85. charArray[5] = "wm";
  86. if(_root.charTeam == "agency")
  87. {
  88.    tempSelect = 4;
  89.    i = 1;
  90.    while(i <= oppTotal)
  91.    {
  92.       tempSelect++;
  93.       if(tempSelect > 5)
  94.       {
  95.          tempSelect = 5;
  96.       }
  97.       this["oppd" + i].oppAnim.charSelect = charArray[tempSelect];
  98.       i++;
  99.    }
  100. }
  101. else
  102. {
  103.    tempSelect = 1;
  104.    i = 1;
  105.    while(i <= oppTotal)
  106.    {
  107.       tempSelect++;
  108.       if(tempSelect > 3)
  109.       {
  110.          tempSelect = 1;
  111.       }
  112.       this["oppd" + i].oppAnim.charSelect = charArray[tempSelect];
  113.       i++;
  114.    }
  115. }
  116.